/* should be char */
#define CPLD_SEG7  *((volatile unsigned char *)0x20800080)   


void delay(int time)	
{
	int i, j;

	for(i = 0; i < time; i++)
		for(j = 0; j < 400000; j++);
}

int main(void)  { 
		int i=0;
		char table[16] = {0x3f, 0x30, 0x6d, 0x79, 0x72, 0x5b, 0x5f, 0x31, 0x7f, 0x7b, 0x77, 0xff, 0x0f, 0x7c, 0x4f, 0x47};
		while(1)  
		{		
			delay(1);
			CPLD_SEG7 = table[i%16];
			i++;
		}
			return 0;
}
		
void __rt_entry(void)
{
		main();
}